package ru.payment.wm.impl;

import org.dom4j.Element;
import ru.payment.wm.WMIDRow;

/**
 *
 * User: sergey
 * Date: 23.04.2009
 * Time: 19:16:17
 *
 */
public class WMIDRowParser extends AbstractResponseParser<WMIDRow, Element> {

  public void parse(Element e, WMIDRow row) throws ProtocolException {
    if (e == null) {
      return;
    }
    row.setWmId( attrAsString(e.attribute("wmid"), ""));
    row.setInfo( attrAsString(e.attribute("info"), ""));
    row.setNickName( attrAsString(e.attribute("nickname"), ""));
    row.setRegisteredDate( attrAsDate(e.attribute("datereg"), "yyyy-MM-dd'T'HH:mm:ss.SSS"));
  }

}
